namespace Backoffice.Domain.Repositories;

public interface IRepository<T>
{
    Task<IEnumerable<T>> GetAllAsync();

    // 分页
    // Task<PageResultDto<T>> GetPagedAsync(int PageIndex,int PageSize);

    Task<T?> GetByIdAsync(Guid id);

    Task<T> CreateAsync(T entity);
    Task UpdateAsync(T entity);

    Task DeleteAsync();
    Task DeleteAsync(Guid id);
    IQueryable<T> Query();
}